﻿using Mammoth.Entities;
using NHibernate.Mapping.ByCode;
using NHibernate.Mapping.ByCode.Conformist;

namespace Mammoth.Mappings
{
    public class OrderMapping : EntityMapping<OrderEntity>
    {
        public OrderMapping()
        {
            Table("tabel_order");
            ManyToOne<ValasEntity>(x => x.RequestedValas,
                m =>
                {
                    m.Column(c => c.Name("ValasId"));
                    m.Lazy(LazyRelation.NoLazy);
                });
            Property(x => x.BuddyEmail);
            Property(x => x.IsValid);
            Property(x => x.IsCommited);
        }
    }

}
